<?php


namespace app\agent\controller\index;

use app\agent\controller\Controller;
use app\agent\model\Shop as ShopModel;
use think\Session;


class Index extends Controller{
    /*
     * 代理端数据统计1111
     */
    public function index(){
        //获取当前登录的代理商信息
        $agentInfo=Session::get('yoshop_agent.agent');
        //var_dump($agentInfo);die;
        if(empty($agentInfo)){
            return $this->renderError('登录信息不存在，请重新登录');
        }
        $shopModel=new ShopModel();
        $data=$shopModel->getAgentData($agentInfo);
        return $this->fetch('index',['data' =>$data]);
    }
}